home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
269_01
/
manual2.doc
< prev
next >
Wrap
Text File
|
1987-05-15
|
22KB
|
990 lines
E
Unicorn Library Documentation 3.1 page 47
__________________________________________________________________
ellipser
F
Plots an ellipse on the graphics screen. The ellipse may be
rotated in 6 degree increments from 0 to 90 degrees. To obtain
full 360 degree rotation the major axis may be defined as either
x or y with rotation.
Call: ellipser(xc, yc, rotate, r1, r2, color);
xc = column coordinate of center
yc = row coordinate of center
rotate = angle of rotation (0, 6, 12, 18 etc.)
r1 = half the distance along the x-axis (columns)
r2 = half the distance along the y axis (rows)
color = color of the ellipse
Example: main()
{
sm(4); /* set graphics mode */
/* draw an ellipse in color 2 rotated 48 degrees */
ellipser(100,100,48, 50, 80, 2);
}
Unicorn 1 Documentation 3.1 page 48
__________________________________________________________________________
equip
Returns an integer idicative of the equipment contained on the PC. The
number may be interpreted as follows:
bit 0 - diskette installed
bit 1 - not used
bit 2, 3 - always 11
bit 4, 5 - initial video mode
01 = 40 x 25 BW
10 = 80 x 25 BW
bit 6, 7 - number of diskette drives ( only if bit 0 = 1)
00 = 1
01 = 2
bit 8 - 0 = dma present
1 = no dma on system
bit 9, 10, 11 - number of RS-232 cards installed
bit 12 - game I/O attached
bit 13 - not used
bit 14, 15 - number of printers
Call: equip();
Example: main()
{
equip(); /* get current equipment status */
}
E
Unicorn Library Documentation 3.1 page 49
___________________________________________________________________
factrl
F
Returns the factorial of an integer as a double.
Call: factrl(8);
Example: main()
{
double a;
a = factrl(21);
}
E
Unicorn Library Documentation 3.1 page 50
__________________________________________________________________
fibon
F
Returns the integer sum of all the integers up to and including
the passed parameter.
Call: fibon(number);
number = ending point of adding numbers
Example: main()
{
int a;
a = fibon(5);
}
E
Unicorn Library Documentation 3.1 page 51
__________________________________________________________________
forward
F
Moves the turtle (turtle graphics) in its current direction by a
specified distance. The distance is measured in pixels.
Call: forward(pixels);
pixels = number of pixels to move in current direction
Example: main()
{
sm(4); /* set graphics mode */
pendown(); /* set pen down on screen to draw */
forward(50); /* move forward 50 pixels */
}
E
Unicorn Library Documentation 3.1 page 52
__________________________________________________________________
fpower
F
Returns fractional powers of doubles. It works only with positive
numbers although the power may be negative.
Call: fpower(number, pow);
number = double value to raise to a power
pow = double power
Example: main()
{
fpower(5.67, 2.43);
Unicorn 1 Documentation 3.1 page 53
__________________________________________________________________________
getchne
Get a character from the standard input with no echo.
Call: getchne();
Example: main()
{
int a;
a = getchne(); /* return a character in a with no echo */
}
Unicorn 1 Documentation 3.1 page 54
__________________________________________________________________________
getctype
Returns an integer indicating the type of IBM-PC.
return:
FFh = Original IBM-PC
FEh = PC XT, portable PC or PC with revised system board
FDh = PCjr
FCh = PC-AT
Call: getctype();
Example: main()
{
int a;
a = getctype(); /* find what type of machine it is */
if (a==255)
printf("This is an original IBM-PC");
}
E
Unicorn Library Documentation 3.1 page 55
__________________________________________________________________
getcurp
F This returns the current position of the cursor on the screen in
row, column format.
Call: getcurp(&row, &column);
row = the current cursor row position
column = the current cursor column position
Example: main()
{
getcurp(row, column);
}
Unicorn 1 Documentation 3.1 page 56
__________________________________________________________________________
gliss
Produces a sliding sound or glissando using the IBM mode of sound
production.
Call: gliss(beg, end, rate);
beg = starting frequency
end = ending frequency
rate = rate of increase/decrease. a larger rate slows it down
Example: main()
{
gliss(300, 2000, 1); /* rapid slide from 300 to 2000 cycles*/
gliss(2000, 300, 10); /* slower slide down from 2000 to
300 cycles */
}
E
Unicorn Library Documentation 3.1 page 57
__________________________________________________________________
gothic
F Displays Gothic characters on the graphics screen. All characters
are displayed in a 16 pixel wide by 20 pixel high matrix.
Call: gothic(char, ulc, ulr, color);
char = character to print
ulc = upper left corner column
ulr = upper left corner row
color = color of the character
Example: main()
{
sm(4); /* set graphics mode */
/* print a gothic W at 20, 30 in color 3 */
gothic('W', 20, 30, 3);
}
E
Unicorn Library Documentation 3.1 page 58
___________________________________________________________________
hollow
F
This function prints outline characters on the graphics screen. The
characters are defined in a 16 column by 30 row pixel matrix.
Call: hollow(char, ulc, ulr, color);
char = character to print
ulc